let arr1: Array<number> = [1, 2, 3];
arr1.push(1);
// 报错
// arr1.push('2');

let arr2: string[] = ['1', '2'];
arr2.push('s');
// 报错
// arr2.push(1);

